{% extends 'base.html' %}

{% block content%}
    {% if user.is_superuser and not object.dismissed %}
    <a style="float:right;" href="{% url employee_update object.id %}"><img src="{{ MEDIA_URL }}images/edit_big.png"/></a>
    {% endif %}

    <table class="forma">
    <tr class="color2"><td colspan="2" class="heador"><strong>Информация о сотруднике</strong></td></tr>
    <tr class="color1"><td>Фотография:</td><td valign="middle">{% if object.photo %}
        <a href="{{ object.photo.url }}" target="_blank"><img src="{{ object.photo.url }}" width="100px"/></a>{% else %}<strong>-</strong>{% endif %}</td></tr>
    <tr class="color2"><td width="30%">Имя:</td><td><strong>{{object.name}}</strong></td></tr>
    <tr class="color1"><td>Фамилия:</td><td><strong>{{object.lastname}}</strong></td></tr>
    <tr class="color2"><td>Отчество:</td><td><strong>{{object.patronymic}}</strong></td></tr>
    <tr class="color1"><td>Табельный номер:</td><td><strong>{{object.tabel_number}}</strong></td></tr>
    <tr class="color2"><td>Постоянный номер:</td><td><strong>{{object.permanent_number}}</strong></td></tr>
    <tr class="color1"><td>День рождения:</td><td><strong>{{object.birthday}}</strong></td></tr>
    <tr class="color2"><td>Пол:</td><td><strong>{{object.get_gender_display}}</strong></td></tr>
    <tr class="color1"><td>Привилегия по отпуску:</td><td><strong>{% if object.vacation_privilege %}Есть{% else %}Нет{% endif %}</strong></td></tr>
    <tr class="color2"><td>Должность:</td><td><strong>{{object.get_worker_or_rsis_display}}</strong></td></tr>
    <tr class="color1"><td>Оперативный ремонт:</td><td><strong>{% if object.operative_repair %}Да{% else %}Нет{% endif %}</strong></td></tr>
    {% if object.operative_repair %}
        <tr class="color1"><td>Оборудование:</td><td><strong>{{ object.equip }}</strong></td></tr>
    {% endif %}
    <tr class="color2"><td>Профессия:</td><td><strong>{{object.profession}}</strong></td></tr>
    <tr class="color1"><td>Подразделение:</td><td><strong>{{object.unit}}</strong></td></tr>
    <tr class="color2"><td>Фактическое подразделение:</td><td><strong>{{object.actual_unit}}</strong></td></tr>
    <tr class="color1"><td>Пасспорт:</td><td>{% if object.passport %}<strong>{{object.passport}}</strong>{% else %}<strong>-</strong>{% endif %}</td></tr>
    <tr class="color2"><td>Адрес:</td><td><strong>{{object.address}}</strong></td></tr>
    <tr class="color1"><td>Домашний телефон:</td><td><strong>{{object.phone}}</strong></td></tr>
    <tr class="color2"><td>Сотовый телефон:</td><td>{% if object.mobile_phone %}<strong>{{object.mobile_phone}}</strong>{% else %}<strong>-</strong>{% endif %}</td></tr>
    <tr class="color1"><td>Статус:</td><td><strong>{% if object.dismissed %}Уволен{% else %}Работает{% endif %}</strong></td></tr>
</table>




{% endblock %}